home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2006 May
/
PCWMAY06.iso
/
Software
/
Freeware
/
First Page 2006 3.00
/
fp2006-final-3.00-setup.exe
/
{app}
/
Iscripts
/
Form & Validation
/
select-all.izs
< prev
next >
Wrap
Text File
|
2005-08-29
|
1KB
|
56 lines
<!NOWIZARD>
<!TITLE>"Select-all" form element script
<!/TITLE>
<!DESCRIPTION>This script allows you to add a "select all": feature to your form <textarea>s, whereby visitors can easily highlight the containing content with a click on a link.
<!/DESCRIPTION>
<!CATEGORY>form and form validation<!/CATEGORY>
<!SCRIPT>
<!-- START OF SCRIPT -->
<script language="Javascript">
<!--
function selectAll(theField) {
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
}
//-->
</script>
<form name="test">
<a href="javascript:selectAll('test.select1')">Select All</a><br>
<textarea name="select1" rows=10 cols=20>This is some text. This is some text. This is some text. This is some text.</textarea>
</form>
<!-- END OF SCRIPT -->
<!/SCRIPT>
<!PREVIEW>
<!-- START OF SCRIPT -->
<script language="Javascript">
<!--
function selectAll(theField) {
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
}
//-->
</script>
<form name="test">
<a href="javascript:selectAll('test.select1')">Select All</a><br>
<textarea name="select1" rows=10 cols=20>This is some text. This is some text. This is some text. This is some text.</textarea>
</form>
<!-- END OF SCRIPT -->
<!/PREVIEW>
<!RELATED>NONE<!/RELATED>